<?
require_once("../config/dbconn.php");require_once("../config/powercls.php");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.red{
	color:red
}
-->
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script language="javascript" type="text/javascript" src="../calendar/WdatePicker.js"></script>
<link href="images/skin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="29" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td width="935" height="29" valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">系统统计</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="13" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top">
		<form id="form1" name="form1" method="post" action="?act=query">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
           
            <tr>
              <td height="30">
			  <?
			  if ($act=='query'){
			  	if (trim($curday)==''){
					die("请选择日期");
				}
			  	$curday=trim($curday);
			  }else{
			   $curday=date('Y-m-d',$curtime);
			   }
			  ?>
			  <table width="100%" height="150" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt">日期：</td>
                  <td height="30" bgcolor="#FFFFFF" class="left_txt"><label>
                      <input name="curday" type="text" id="curday" size="12" onClick="WdatePicker()" value="<?=$curday?>" >
                      <input type="submit" name="Submit" value="查询">
</label></td>
                </tr>
                <tr>
                  <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt">充值总额</td>
                  <td height="30" bgcolor="#FFFFFF" class="left_txt"><?
				//奖金收入
				
				$sqlsr="select sum(price) as c from {$db_prefix}huikuan where from_unixtime(edittime,'%Y-%m-%d')='$curday'";
				$rssr=$db->get_one($sqlsr);
				echo floatval($rssr['c']);
				?></td>
                </tr>
                <tr>
                  <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt">奖金总额</td>
                  <td height="30" bgcolor="#FFFFFF" class="left_txt">
				  <?
				 $sqlsr="select sum(price) as c from {$db_prefix}caiwu where ptype=3 and from_unixtime(addtime,'%Y-%m-%d')='$curday'";
				$rssr=$db->get_one($sqlsr);
				echo floatval($rssr['c']);
				  ?></td>
                </tr>
                <tr>
                  <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt">提现总额</td>
                  <td height="30" bgcolor="#FFFFFF" class="left_txt">
				  <?
				 $sqlsr="select sum(price) as c from {$db_prefix}tixian where from_unixtime(edittime,'%Y-%m-%d')='$curday'";
				$rssr=$db->get_one($sqlsr);
				echo floatval($rssr['c']);
				  ?>				  </td>
                </tr>
                <tr>
                  <td height="30" align="center" bgcolor="#FFFFFF" class="left_txt">&nbsp;</td>
                  <td height="30" bgcolor="#FFFFFF" class="left_txt"><label></label></td>
                </tr>
              </table></td>
            </tr>
            
            <tr>
              <td height="44">&nbsp;</td>
            </tr>
          </table>
		  </form>
		  </td>
      </tr>
    </table></td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
      <td height="17" valign="top" background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17" /></td>
    <td background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>

</body>
</html>